package main

import (
	"net"
	"log"
	"block_proto"
	"block_node"
	"google.golang.org/grpc"
)

const (
	PORT = ":21630"
)

func main() {
	lisAddress, err := net.Listen("tcp", PORT)
	if err != nil {
		log.Fatalf("failed to listen: %v", err)
	}
	s := grpc.NewServer()
	block_proto.RegisterBlockNodeServer(s, &block_node.BlockServer{})
	s.Serve(lisAddress)
}